package com.qisu.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.qisu.dao.AccountDao;

/**
 * 
 * @author li
 *
 */
@Service
public class AccountService {
	@Autowired private AccountDao accountDao;
	
	/**
	 * 结算订单时更新账户信息
	 * @param userId
	 * @param actualPay
	 */
	public void updateAccount(String userId, int actualPay) {
		accountDao.updateAccount(userId,actualPay);
	}
	
	
	/**
	 * 账户流水记录
	 * @param userId
	 * @param orderId
	 * @param actualPay
	 */
	public void insertAccountRecord(String userId, String orderId, int actualPay) {
		accountDao.insertAccountRecord(userId,orderId,actualPay);
	}

	
	public void setUserAccount(String userId) {
		accountDao.setUserAccount(userId);
		
	}


	/**
	 * 代付人账户
	 * @param agentId
	 * @param refundMoney
	 */
	public void setAgentAccount(String agentId, int refundMoney) {
		accountDao.setAgentAccount(agentId,refundMoney);
		
	}

	/**
	 * 代付流水记录表
	 * @param orderId
	 * @param refundMoney
	 */
	public void insertAgentRecord(String orderId, int refundMoney) {
		accountDao.insertAgentRecord(orderId,refundMoney);
	}

}
